| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | List of all members
nkScripts::ScriptObjectReference Class Referencefinal

A reference over an object in the scripting environment. More...

## Public Member Functions
| ScriptObjectReference () noexcept
| ScriptObjectReference (ScriptObjectInterpreterReference *reference) noexcept
| ScriptObjectReference (const ScriptObjectView &other) noexcept
| ScriptObjectReference (const ScriptObjectReference &other) noexcept
| ScriptObjectReference (ScriptObjectReference &&other) noexcept
| ~ScriptObjectReference ()
ScriptObjectInterpreterReference * | getInterpreterReference () const
FUNCTION_PARAMETER_TYPE | getType () const
ScriptObjectReference & | operator= (const ScriptObjectView &other) noexcept
ScriptObjectReference & | operator= (const ScriptObjectReference &other) noexcept
ScriptObjectReference & | operator= (ScriptObjectReference &&other) noexcept

## Detailed Description

A reference over an object in the scripting environment.

This class touches the reference counting in the environment, and can prevent an object from being freed. To avoid leak, external code should ensure this reference is only used when needed.

In theory, this class should never be altered by external code. Rather, it will be used as parameters for functions using it.

## Constructor & Destructor Documentation

## ◆ ScriptObjectReference() [1/5]

nkScripts::ScriptObjectReference::ScriptObjectReference | ( |  | ) |
| noexcept

Default constructor.

## ◆ ScriptObjectReference() [2/5]

nkScripts::ScriptObjectReference::ScriptObjectReference | ( | ScriptObjectInterpreterReference * | reference | ) |
| noexcept

Constructor from an interpreter specific reference.

Parameters

  reference | The reference to keep.

## ◆ ScriptObjectReference() [3/5]

nkScripts::ScriptObjectReference::ScriptObjectReference | ( | const ScriptObjectView & | other | ) |
| noexcept

Constructor from a view over the data.

Parameters

  other | The view to construct the reference from.

## ◆ ScriptObjectReference() [4/5]

nkScripts::ScriptObjectReference::ScriptObjectReference | ( | const ScriptObjectReference & | other | ) |
| noexcept

Copy constructor.

Parameters

  other | The reference to copy from.

## ◆ ScriptObjectReference() [5/5]

nkScripts::ScriptObjectReference::ScriptObjectReference | ( | ScriptObjectReference && | other | ) |
| noexcept

Move constructor.

Parameters

  other | The reference to take over.

## ◆ ~ScriptObjectReference()

nkScripts::ScriptObjectReference::~ScriptObjectReference | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ getInterpreterReference()

ScriptObjectInterpreterReference* nkScripts::ScriptObjectReference::getInterpreterReference | ( |  | ) | const

Returns
  The interpreter specific reference data.

## ◆ getType()

FUNCTION_PARAMETER_TYPE nkScripts::ScriptObjectReference::getType | ( |  | ) | const

Returns
  The referenced script object type.

## ◆ operator=() [1/3]

ScriptObjectReference& nkScripts::ScriptObjectReference::operator= | ( | const ScriptObjectView & | other | ) |
| noexcept

View assignment operator.

Parameters

  other | The view to construct a reference from.

Returns
  The reference after operation.

## ◆ operator=() [2/3]

ScriptObjectReference& nkScripts::ScriptObjectReference::operator= | ( | const ScriptObjectReference & | other | ) |
| noexcept

Copy assignment operator.

Parameters

  other | The reference to copy from.

Returns
  The reference after operation.

## ◆ operator=() [3/3]

ScriptObjectReference& nkScripts::ScriptObjectReference::operator= | ( | ScriptObjectReference && | other | ) |
| noexcept

Move assignment operator.

Parameters

  other | The reference to move.

Returns
  The reference after operation.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsScripts/Environments/ScriptObjects/ScriptObjectReference.h